package Control;

import Model.User;
import View.Menu;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class main {

    public static ArrayList<User> userList = new ArrayList<>();
    public static Scanner s = new Scanner(System.in);

    public static void main(String[] args) throws IOException {

        //文件写入测试程序
        /*File userData = fileProcess.fileCreate();
        User u = new User("1","1","1","1","1");
        userList.add(u);
        User u1 = new User("2","2","2","2","2");
        userList.add(u1);
        userData = fileProcess.fileWrite(userData);*/

//主程序
        //创建文件对象
        File userData = fileProcess.fileCreate();
        //文件读取测试程序
        fileProcess.fileRead();
        //欢迎界面
        Menu.welcome();
        //系统运行
        while(true) {
            Menu.menuPrint();
            Menu.execution();
            userData = fileProcess.fileWrite(userData);
        }
    }
}
